//
//  WHValidationHelper.h
//  LvZhongMagicKey
//
//  Created by 邓伟浩 on 2017/12/18.
//  Copyright © 2017年 邓伟浩. All rights reserved.
//

#import <Foundation/Foundation.h>

@interface WHValidationHelper : NSObject

/** 输入文本不大于10 */
+ (BOOL)ValidTextField:(UITextField *)textField shouldChangeCharactersInRange:(NSRange)range replacementString:(NSString *)string;

/** 验证身份证输入 */
+ (BOOL)validateIDCard:(NSString *)str;

/** 验证输入任意字符不大于length */
+ (BOOL)validateStringLength:(NSString *)str length:(int)length;

/** 验证输入字符不大于length */
+ (BOOL)validatePasswordLength:(NSString *)str length:(int)length;

/** 验证数字不大于length */
+ (BOOL)validateNumber:(NSString *)numStr length:(int)length;

/** 验证小数,小数点前preLenth, 小数点后afterLength */
+ (BOOL)validateDouble:(NSString *)str preLength:(int)preLength afterLength:(int)afterLength;

/** 验证输入的为金额, 最多2位小数 */
+ (BOOL)validateMoney:(NSString *)str;

/** 验证输入为0.5整数倍 */
+ (BOOL)validatePercentNum:(NSString *)str;

/** 判断输入是否全是空格 */
+ (BOOL)isEmpty:(NSString *)str;

/** 验证密码为6-12位字母和数字组合 */
+ (BOOL)validatePassword:(NSString *)passWord;

+ (BOOL) validateEmail:(NSString *)email;

+ (BOOL) validateMobile:(NSString *)mobile;

+ (BOOL) validateNumeric:(NSString *)numberic;

+ (BOOL)checkBankCardNumber:(NSString *)cardNumber;

/** 判断身份证号是否合法 */
+ (BOOL)checkIdentityCardNo:(NSString*)cardNo;

@end
